package com.burstly.lib.component.networkcomponent.burstly.html.ormma.util;

import android.os.Bundle;
import com.burstly.lib.util.LoggerExt;

public class OrmmaUtils
{
  private static final String CHAR_SET = "ISO-8859-1";
  private static final LoggerExt LOG = LoggerExt.getInstance();
  private static final String TAG = "OrmmaUtils";

  public static String byteToHex(byte paramByte)
  {
    char[] arrayOfChar1 = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102 };
    char[] arrayOfChar2 = new char[2];
    arrayOfChar2[0] = arrayOfChar1[(0xF & paramByte >> 4)];
    arrayOfChar2[1] = arrayOfChar1[(paramByte & 0xF)];
    return new String(arrayOfChar2);
  }

  public static String convert(String paramString)
  {
    while (true)
    {
      StringBuffer localStringBuffer;
      int i;
      try
      {
        byte[] arrayOfByte = paramString.getBytes();
        localStringBuffer = new StringBuffer();
        i = 0;
        if (i < arrayOfByte.length)
          if ((0x80 & arrayOfByte[i]) > 0)
            localStringBuffer.append('%').append(byteToHex(arrayOfByte[i]));
          else
            localStringBuffer.append((char)arrayOfByte[i]);
      }
      catch (Exception localException)
      {
        LOG.logThrowable("OrmmaUtils", localException);
        return null;
      }
      String str = new String(localStringBuffer.toString().getBytes(), "ISO-8859-1");
      return str;
      i++;
    }
  }

  public static String getData(String paramString, Bundle paramBundle)
  {
    return paramBundle.getString(paramString);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.component.networkcomponent.burstly.html.ormma.util.OrmmaUtils
 * JD-Core Version:    0.6.2
 */